package com.caigou.comm.base.ext

import com.caigou.comm.R

/**
 * @author #Suyghur.
 * Created on 2021/11/28
 */

fun levelAliasImage(level: Int): Int {
    return when (level) {
        0, 1 -> R.drawable.img_comm_lv1
        2 -> R.drawable.img_comm_lv2
        3 -> R.drawable.img_comm_lv3
        4 -> R.drawable.img_comm_lv4
        5 -> R.drawable.img_comm_lv5
        6 -> R.drawable.img_comm_lv6
        7 -> R.drawable.img_comm_lv7
        8 -> R.drawable.img_comm_lv8
        9 -> R.drawable.img_comm_lv9
        10 -> R.drawable.img_comm_lv10
        else -> R.drawable.img_comm_lv1
    }
}

fun levelImage(level: Int): Int {
    return when (level) {
        0, 1 -> R.drawable.img_comm_lv1_2
        2 -> R.drawable.img_comm_lv2_2
        3 -> R.drawable.img_comm_lv3_2
        4 -> R.drawable.img_comm_lv4_2
        5 -> R.drawable.img_comm_lv5_2
        6 -> R.drawable.img_comm_lv6_2
        7 -> R.drawable.img_comm_lv7_2
        8 -> R.drawable.img_comm_lv8_2
        9 -> R.drawable.img_comm_lv9_2
        10 -> R.drawable.img_comm_lv10_2
        else -> R.drawable.img_comm_lv1_2
    }
}


fun growthVoMax(growthVo: Int): Int {
    return when (growthVo) {
        in 0..49 -> 50
        in 50..149 -> 150
        in 150..449 -> 450
        in 450..1349 -> 1350
        in 1350..4049 -> 4050
        in 4050..12149 -> 12150
        in 12150..36449 -> 36450
        in 36450..309349 -> 309350
        in 309350..1000000 -> 1000001
        else -> 9999999
    }
}

fun levelName(level: Int): String {
    return when (level) {
        0, 1 -> "新手上路"
        2 -> "六合游民"
        3 -> "六和游侠"
        4 -> "普通彩民"
        5 -> "专业彩民"
        6 -> "彩民专家"
        7 -> "彩民精英"
        8 -> "彩民大师"
        9 -> "彩民至尊"
        10 -> "至高无上"
        else -> "新手上路"
    }
}